package cn.qing.service.Impl;


import cn.qing.mapper.PermissionMapper;
import cn.qing.pojo.Permission;
import cn.qing.service.PermissionService;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PermissionServiceImpl implements PermissionService {
    @Autowired
    PermissionMapper permissionMapper;


    @Override
    public List<Permission> findAll(Integer page, Integer size) {

        PageHelper.startPage(page,size);
        return permissionMapper.findAll();
    }

    @Override
    public void save(Permission permission) {
        permissionMapper.save(permission);
    }
}
